package algorithmTopics.designPatterns.factoryPattern;

/**
 * 演示 工厂设计模式演示，属于创建型模式
 * 将对象的创建与使用分离
 *
 * @author 86155
 * @date 2025/07/20
 */
public class Demo {
    public static void main(String[] args) {
        AbstractFactory color = FactoryProducer.getFactory("color");
        Color blue = color.getColor("blue");
        blue.fill();
        AbstractFactory shape = FactoryProducer.getFactory("shape");
        Shape square = shape.getShape("square");
        square.draw();
    }
}
